home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / ENTRPRIS / PASSTHRU / PASS_SVR.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-11-23  |  2.3 KB  |  74 lines

  1. VERSION 5.00
  2. Begin VB.Form frmPassThru 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "PassThru Server"
  5.    ClientHeight    =   660
  6.    ClientLeft      =   5145
  7.    ClientTop       =   3555
  8.    ClientWidth     =   5190
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    PaletteMode     =   1  'UseZOrder
  12.    ScaleHeight     =   660
  13.    ScaleWidth      =   5190
  14.    Begin VB.Label labSvrProgID 
  15.       Caption         =   "labSvrProgID"
  16.       BeginProperty Font 
  17.          Name            =   "MS Sans Serif"
  18.          Size            =   12
  19.          Charset         =   0
  20.          Weight          =   700
  21.          Underline       =   0   'False
  22.          Italic          =   0   'False
  23.          Strikethrough   =   0   'False
  24.       EndProperty
  25.       Height          =   315
  26.       Left            =   1920
  27.       TabIndex        =   1
  28.       Top             =   150
  29.       Width           =   3150
  30.    End
  31.    Begin VB.Label Label1 
  32.       Caption         =   "CalledServer:"
  33.       BeginProperty Font 
  34.          Name            =   "MS Sans Serif"
  35.          Size            =   12
  36.          Charset         =   0
  37.          Weight          =   700
  38.          Underline       =   0   'False
  39.          Italic          =   0   'False
  40.          Strikethrough   =   0   'False
  41.       EndProperty
  42.       Height          =   315
  43.       Left            =   150
  44.       TabIndex        =   0
  45.       Top             =   165
  46.       Width           =   1665
  47.    End
  48. Attribute VB_Name = "frmPassThru"
  49. Attribute VB_GlobalNameSpace = False
  50. Attribute VB_Creatable = False
  51. Attribute VB_TemplateDerived = False
  52. Attribute VB_PredeclaredId = True
  53. Attribute VB_Exposed = False
  54. Option Explicit
  55. Private Sub Form_Load()
  56. #If gbDEBUG Then       'Debug code... use for testing without external client
  57.   Dim objPassThruSvr As Object
  58.   Dim objSvr As Object
  59.   Dim bSvrCreated As Integer
  60.   Dim bSuccess As Integer
  61.   On Error GoTo flErr
  62.   Set objPassThruSvr = CreateObject("PassThruProj.PassThruClass")
  63.   bSvrCreated = True
  64.   Set objSvr = objPassThruSvr.RunServer("HelloProj.HelloClass", bSuccess)
  65.   If bSuccess Then MsgBox objSvr.SayHello    'Just prove connection worked
  66.   GoTo flExit
  67. flErr:
  68.   Resume flExit
  69. flExit:
  70.   If bSuccess Then Set objSvr = Nothing
  71.   If bSvrCreated Then Set objPassThruSvr = Nothing
  72. #End If
  73. End Sub
  74.